package com.leeon.container;

import java.util.LinkedHashSet;
import java.util.Set;

import net.mindview.util.Generator;

class Government implements Generator<String>{

	String[] foundation = "a b c d e f g i j k l n m".split("  ");
	
	private int index = 0;
	
	@Override
	public String next() {
		if(index >= foundation.length){
			index = 0;
		}
		return foundation[index++];
	}
	
}

public class CollectionDataTest {
	
	public static void main(String[] agrs){
		Set<String> set = new LinkedHashSet<String>(
				new CollectionData<String>(new Government(), 10));
		System.out.println(set);
		set.addAll(CollectionData.list(new Government(), 10));
		System.out.println(set);
	}
}
